/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package submarinesControl;

import model.Board;
/*
 *
 * @author Karnit Genchay
 */
public class Player 
{  
    private String name;

    public void setName(String name) {
        this.name = name;
    }
    private String type;
    private playerStatus status;
    public Board board;
    
    
    public Player(String name,String type)
    {
        this.name=name;
        this.type=type;
        this.status = playerStatus.Active;
    }

    public enum playerStatus {
        Quit,
        Killed,
        Active
    }
    
        
        void setQuit() {
        this.status = playerStatus.Quit;
    }
        
        void setKilled() {
        this.status = playerStatus.Killed;
    }
        public playerStatus getStatus() {
        return status;
    }

    public Board getBoard() {
        return board;
    }

    public String getName() {
        return name;
    }

    public String getType() {
        return type;
    }

    public String returnName(){ return name;}
    public boolean isHuman(){
        if (type.equals("HUMAN"))
                return true;
        else 
            return false;
    }
    
//    public String returnType(){ return type;}
public void setBoard(Board board){
   this.board = board; 
}
    public void printWithSubmarines(){
        board.printWithSubmarines();
    }
    
    @Override
    public String toString(){
        return  name +" ( " + type + ") ";
    }


}
